package org.wlw.rpg;

public class Wizard extends Player{
    public Wizard(String name) {
        super(name);
        this.maxLife = 60;
        this.life = this.maxLife;
        this.attack = 40;
        this.defense = 5;
        this.agile = 10;
        this.critRate = 30;
        this.critDamage = 260;
        Tools.godSay("勇敢的魔法师["+name+"]在乱世中诞生了!");
        Tools.playerSay(name+":惩恶扬善!");
    }

    @Override
    public void fightWay(Enemy e) {
        Tools.godSay(this.name+"举起了魔法杖，向"+e.name+"发生了冰冻射线!嗡嗡嗡!");
        Tools.playerSay(this.name+":哇哇哇!看我的魔法射线");
    }

    @Override
    public void checkUpgrade() {
        System.out.println(Tools.getUpgradeExp(level)+"HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
        if(exp>=Tools.getUpgradeExp(level)) {
            Tools.playerSay(this.name+":啦啦啦啦！魔法协会赐予我魔法!我升级啦!");
            this.maxLife+=10;
            this.life = this.maxLife;
            this.attack+=6;
            this.defense+=1;
            this.agile+=1;//敏捷增加2
            this.critRate+=5;
            this.critDamage+=200;
            this.level+=1;
            this.show();
        }
    }
}
